﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Abp.Json;
using Abp.Timing;
using AutoMapper.Internal;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace Ixyu.Web.Host.Startup
{
    public class MyAbpCamelCasePropertyNamesContractResolver : AbpCamelCasePropertyNamesContractResolver
    {
        protected override void ModifyProperty(MemberInfo member, JsonProperty property)
        {
            base.ModifyProperty(member, property);

            if (property.Converter is AbpDateTimeConverter converter)
                converter.DateTimeFormat = "yyyy-MM-dd hh:mm:ss";
        }
    }
}
